/*
 * !Drowning
 * May 29, 2011
 * TCSS 360
 * Schedule Project
 */
import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

/**
 * Tests for the Users
 * @author Efim Todorasco
 */

public class UserTest {
	private User user = new User("test_user");
	@Before
	public void testUserPrefences() {
		preference preferences = new preference("TFIN428", "TR", 800, 1005);
		user.addPreference(preferences);
	}
	@Test
	public void testAddUserPrefs() {
		String start = "[Course ID: TFIN428 Days: TR Start Time: 800 End Time: 1005]";
		assertEquals(start, user.getPreferences().toString());
	}
	@Test
	public void testSetUserName() {
		user.setUsername("another_test_user");
		String start = "another_test_user";
		assertEquals(start, user.getUsername());
	}
}
